/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.servinf.ani.sincronizador.service;

import com.servinf.ani.sincronizador.dao.ProjectByDepartmentDAO;
import com.servinf.ani.sincronizador.entities.ProyectosXDepartamento;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Clase de servicios para el tipo de proyecto.
 * @author mortiz
 */
@Component
public class ProjectByDepartmentService {
    
    private ProjectByDepartmentDAO projectByDepartmentDAO;

    public ProjectByDepartmentDAO getProjectByDepartmentDAO() {
        return projectByDepartmentDAO;
    }

    @Autowired
    public void setProjectByDepartmentDAO(ProjectByDepartmentDAO projectByDepartmentDAO) {
        this.projectByDepartmentDAO = projectByDepartmentDAO;
    }
   
   
    public List<ProyectosXDepartamento> findAll(){
        List<ProyectosXDepartamento> projectByDepartmentList = getProjectByDepartmentDAO().findAll();
        return projectByDepartmentList;
    }
    
    
    public List<ProyectosXDepartamento> findByProjectId(Integer projectId){
        List<ProyectosXDepartamento> projectByDepartmentList = getProjectByDepartmentDAO().findByProjectId(projectId);
        return projectByDepartmentList;
    }
    
} 
